Conventionally, various techniques have been proposed to detect an outline of a subject that is drawn in medical image data. As one example, a line expressing an outline is approximated with a row of plural points, and the row of points is set as an outline vector. Furthermore, a direction vector that indicates a direction toward which a cost function with respect to the outline vector decreases is calculated by using numerical differentiation. A method of detecting an outline by repeatedly transforming the outline until the shape of the outline converges by using this direction vector has been known.